package com.ccsu.joysport.controller;

import com.ccsu.joysport.util.OssUploadUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/ccsu/file")
public class FileController {

    @PostMapping("/upload")
    public String upload(MultipartFile file) {
        return OssUploadUtil.uploadFile(file);
    }

}
